/*
 * @Author: yu.zuo
 * @Date: 2020-12-21 18:30:32
 * @LastEditors: yu.zuo
 * @LastEditTime: 2020-12-25 19:07:56
 * @Description: 
 * @FilePath: /test_raw_socket/lib/test_raw_socket.dart
 */
import 'package:logging/logging.dart';

import 'test_raw_socket/raw_socket_test.dart' as testRawSocket;
import 'test_web_socket/web_socket_test.dart' as testWebSocket;
import 'test/test_connect_im_server.dart';

int calculate() {
  return 6 * 7;
}

void test() {
  // testRawSocket.testSimpleReadWrite2(dropReads: false);
  // var test = new testWebSocket.SecurityConfiguration(secure: true);
  // test.runTests();
  // .testConnections(1, 3002, "Got tired");
  // .testFromUpgradedSocket();
  // .runTests();
  // .testRequestResponseClientCloses(2, null, null, 1);
  // .testMessageLength(125);
  // testLogging();
  // test_connect_server();
  // test_timer();
  // test_connect_self_server();
  // test_connect_other_wss();
  // test_websocket_channel();
  test_websocket_channel_protobuf();
}

void testLogging() {
  Logger.root.level = Level.ALL; // defaults to Level.INFO
  Logger.root.onRecord.listen((record) {
    print(
        '${record.level.name}: ${record.time}: ${record.sequenceNumber}: ${record.message}');
  });
  final log = Logger('MyClassName');
  log.fine("message");
  log.warning("message");
}
